<?php


class User
{
    private $username;

    private $email;

    public static function fromState($state)
    {
        return new self($state['username'], $state['email']);
    }

    public function __constructor($username,$email)
    {
        $this->username = $username;
        $this->email = $email;
    }

    public function getUsername()
    {
        return $this->username;
    }

    public function getEmail()
    {
        return $this->email;
    }
}